#!/usr/bin/env python
# -*- coding: utf-8 -*-
#coding=utf8

# 本文件由自动工具 proto.py 自动生成，请勿修改
# filename msg14000_csbuf.py
# package ptl

from ptl.base_csbuf import *


# message Req14001
class Req14001:
	def __init__(self):
		self.protoid = 14001
		self.playerId = 0
		self.cursorL = 0
		self.cursorR = 0

	def Marshal(writer):
		writer.setUint32(self.playerId, 1)
		writer.setUint32(self.cursorL, 2)
		writer.setUint32(self.cursorR, 3)

	def Unmarshal( reader):
		self.playerId = reader.getUint32(1)
		self.cursorL = reader.getUint32(2)
		self.cursorR = reader.getUint32(3)
# message Resp14001
class Resp14001:
	def __init__(self):
		self.protoid = 14001
		self.playerId = 0
		self.friends = []
		self.cursorL = 0
		self.cursorR = 0

	def Marshal(writer):
		writer.setUint32(self.playerId, 1)
		countfriends = len(self.friends)
		writer.setArray(countfriends, 2)
		for i in range(countfriends):
			writer.setMessage(0)
			self.friends[i].Marshal(writer)
			writer.endSetMessage()
		writer.setUint32(self.cursorL, 3)
		writer.setUint32(self.cursorR, 4)

	def Unmarshal( reader):
		self.playerId = reader.getUint32(1)
		for i in range(reader.getArray(2)):
			msg = Friend() 
			reader.getMessage(0)
			msg.Unmarshal(reader)
			reader.endGetMessage()
			self.friends.append(msg)
		self.cursorL = reader.getUint32(3)
		self.cursorR = reader.getUint32(4)
# message Req14002
class Req14002:
	def __init__(self):
		self.protoid = 14002
		self.playerId = 0
		self.tRid = 0
		self.msg = ""
		self.type = 0

	def Marshal(writer):
		writer.setUint32(self.playerId, 1)
		writer.setUint32(self.tRid, 2)
		writer.setString(self.msg, 3)
		writer.setUint8(self.type, 4)

	def Unmarshal( reader):
		self.playerId = reader.getUint32(1)
		self.tRid = reader.getUint32(2)
		self.msg = reader.getString(3)
		self.type = reader.getUint8(4)
# message Resp14002
class Resp14002:
	def __init__(self):
		self.protoid = 14002
		self.playerId = 0
		self.status = 0
		self.op = 0
		self.friend = Friend()

	def Marshal(writer):
		writer.setUint32(self.playerId, 1)
		writer.setUint32(self.status, 2)
		writer.setUint8(self.op, 3)
		writer.setMessage(4)
		self.friend.Marshal(writer)
		writer.endSetMessage()

	def Unmarshal( reader):
		self.playerId = reader.getUint32(1)
		self.status = reader.getUint32(2)
		self.op = reader.getUint8(3)
		reader.getMessage(4)
		self.friend.Unmarshal(reader)
		reader.endGetMessage()
# message Req14003
class Req14003:
	def __init__(self):
		self.protoid = 14003
		self.playerId = 0
		self.id = 0
		self.op = 0

	def Marshal(writer):
		writer.setUint32(self.playerId, 1)
		writer.setUint64(self.id, 2)
		writer.setUint8(self.op, 3)

	def Unmarshal( reader):
		self.playerId = reader.getUint32(1)
		self.id = reader.getUint64(2)
		self.op = reader.getUint8(3)
# message Resp14003
class Resp14003:
	def __init__(self):
		self.protoid = 14003
		self.playerId = 0
		self.status = 0
		self.op = 0

	def Marshal(writer):
		writer.setUint32(self.playerId, 1)
		writer.setUint32(self.status, 2)
		writer.setUint8(self.op, 3)

	def Unmarshal( reader):
		self.playerId = reader.getUint32(1)
		self.status = reader.getUint32(2)
		self.op = reader.getUint8(3)
# message Req14004
class Req14004:
	def __init__(self):
		self.protoid = 14004
		self.playerId = 0

	def Marshal(writer):
		writer.setUint32(self.playerId, 1)

	def Unmarshal( reader):
		self.playerId = reader.getUint32(1)
# message Resp14004
class Resp14004:
	def __init__(self):
		self.protoid = 14004
		self.playerId = 0
		self.friends = []
		self.push = []

	def Marshal(writer):
		writer.setUint32(self.playerId, 1)
		countfriends = len(self.friends)
		writer.setArray(countfriends, 2)
		for i in range(countfriends):
			writer.setMessage(0)
			self.friends[i].Marshal(writer)
			writer.endSetMessage()
		countpush = len(self.push)
		writer.setArray(countpush, 3)
		for i in range(countpush):
			writer.setMessage(0)
			self.push[i].Marshal(writer)
			writer.endSetMessage()

	def Unmarshal( reader):
		self.playerId = reader.getUint32(1)
		for i in range(reader.getArray(2)):
			msg = Friend() 
			reader.getMessage(0)
			msg.Unmarshal(reader)
			reader.endGetMessage()
			self.friends.append(msg)
		for i in range(reader.getArray(3)):
			msg = Friend() 
			reader.getMessage(0)
			msg.Unmarshal(reader)
			reader.endGetMessage()
			self.push.append(msg)
# message Req14005
class Req14005:
	def __init__(self):
		self.protoid = 14005
		self.tRid = 0
		self.name = ""

	def Marshal(writer):
		writer.setUint32(self.tRid, 1)
		writer.setString(self.name, 2)

	def Unmarshal( reader):
		self.tRid = reader.getUint32(1)
		self.name = reader.getString(2)
# message Resp14005
class Resp14005:
	def __init__(self):
		self.protoid = 14005
		self.friends = []

	def Marshal(writer):
		countfriends = len(self.friends)
		writer.setArray(countfriends, 1)
		for i in range(countfriends):
			writer.setMessage(0)
			self.friends[i].Marshal(writer)
			writer.endSetMessage()

	def Unmarshal( reader):
		for i in range(reader.getArray(1)):
			msg = Friend() 
			reader.getMessage(0)
			msg.Unmarshal(reader)
			reader.endGetMessage()
			self.friends.append(msg)
# message Req14006
class Req14006:
	def __init__(self):
		self.protoid = 14006
		self.vip = 0
		self.level = 0

	def Marshal(writer):
		writer.setUint32(self.vip, 1)
		writer.setUint32(self.level, 2)

	def Unmarshal( reader):
		self.vip = reader.getUint32(1)
		self.level = reader.getUint32(2)
# message Resp14006
class Resp14006:
	def __init__(self):
		self.protoid = 14006
		self.status = 0

	def Marshal(writer):
		writer.setUint32(self.status, 1)

	def Unmarshal( reader):
		self.status = reader.getUint32(1)
# message Req14007
class Req14007:
	def __init__(self):
		self.protoid = 14007
		pass

	def Marshal(writer):
		pass

	def Unmarshal( reader):
		pass
# message Resp14007
class Resp14007:
	def __init__(self):
		self.protoid = 14007
		self.vip = 0
		self.level = 0

	def Marshal(writer):
		writer.setUint32(self.vip, 1)
		writer.setUint32(self.level, 2)

	def Unmarshal( reader):
		self.vip = reader.getUint32(1)
		self.level = reader.getUint32(2)
# message Req14010
class Req14010:
	def __init__(self):
		self.protoid = 14010
		self.playerId = 0
		self.name = ""
		self.ann = ""

	def Marshal(writer):
		writer.setUint32(self.playerId, 1)
		writer.setString(self.name, 2)
		writer.setString(self.ann, 3)

	def Unmarshal( reader):
		self.playerId = reader.getUint32(1)
		self.name = reader.getString(2)
		self.ann = reader.getString(3)
# message Resp14010
class Resp14010:
	def __init__(self):
		self.protoid = 14010
		self.status = 0
		self.talkTeam = TalkTeam()
		self.playerId = 0

	def Marshal(writer):
		writer.setUint32(self.status, 1)
		writer.setMessage(2)
		self.talkTeam.Marshal(writer)
		writer.endSetMessage()
		writer.setUint32(self.playerId, 3)

	def Unmarshal( reader):
		self.status = reader.getUint32(1)
		reader.getMessage(2)
		self.talkTeam.Unmarshal(reader)
		reader.endGetMessage()
		self.playerId = reader.getUint32(3)
# message Req14011
class Req14011:
	def __init__(self):
		self.protoid = 14011
		self.playerId = 0
		self.teamId = 0

	def Marshal(writer):
		writer.setUint32(self.playerId, 1)
		writer.setUint32(self.teamId, 2)

	def Unmarshal( reader):
		self.playerId = reader.getUint32(1)
		self.teamId = reader.getUint32(2)
# message Resp14011
class Resp14011:
	def __init__(self):
		self.protoid = 14011
		self.talkTeams = []
		self.playerId = 0

	def Marshal(writer):
		counttalkTeams = len(self.talkTeams)
		writer.setArray(counttalkTeams, 1)
		for i in range(counttalkTeams):
			writer.setMessage(0)
			self.talkTeams[i].Marshal(writer)
			writer.endSetMessage()
		writer.setUint32(self.playerId, 2)

	def Unmarshal( reader):
		for i in range(reader.getArray(1)):
			msg = TalkTeam() 
			reader.getMessage(0)
			msg.Unmarshal(reader)
			reader.endGetMessage()
			self.talkTeams.append(msg)
		self.playerId = reader.getUint32(2)
# message Req14012
class Req14012:
	def __init__(self):
		self.protoid = 14012
		self.playerId = 0
		self.tPlayerIds = []
		self.teamId = 0

	def Marshal(writer):
		writer.setUint32(self.playerId, 1)
		counttPlayerIds = len(self.tPlayerIds)
		writer.setArray(counttPlayerIds, 2)
		for i in range(counttPlayerIds):
			writer.setUint32(self.tPlayerIds[i], 0)
		writer.setUint32(self.teamId, 3)

	def Unmarshal( reader):
		self.playerId = reader.getUint32(1)
		for i in range(reader.getArray(2)):
			self.tPlayerIds.append(reader.getUint32(0))
		self.teamId = reader.getUint32(3)
# message Resp14012
class Resp14012:
	def __init__(self):
		self.protoid = 14012
		self.status = 0
		self.playerId = 0

	def Marshal(writer):
		writer.setUint32(self.status, 1)
		writer.setUint32(self.playerId, 2)

	def Unmarshal( reader):
		self.status = reader.getUint32(1)
		self.playerId = reader.getUint32(2)
# message Req14013
class Req14013:
	def __init__(self):
		self.protoid = 14013
		self.playerId = 0
		self.teamId = 0

	def Marshal(writer):
		writer.setUint32(self.playerId, 1)
		writer.setUint32(self.teamId, 2)

	def Unmarshal( reader):
		self.playerId = reader.getUint32(1)
		self.teamId = reader.getUint32(2)
# message Resp14013
class Resp14013:
	def __init__(self):
		self.protoid = 14013
		self.status = 0
		self.playerId = 0

	def Marshal(writer):
		writer.setUint32(self.status, 1)
		writer.setUint32(self.playerId, 2)

	def Unmarshal( reader):
		self.status = reader.getUint32(1)
		self.playerId = reader.getUint32(2)
# message Req14014
class Req14014:
	def __init__(self):
		self.protoid = 14014
		self.playerId = 0
		self.tPlayerId = 0
		self.teamId = 0

	def Marshal(writer):
		writer.setUint32(self.playerId, 1)
		writer.setUint32(self.tPlayerId, 2)
		writer.setUint32(self.teamId, 3)

	def Unmarshal( reader):
		self.playerId = reader.getUint32(1)
		self.tPlayerId = reader.getUint32(2)
		self.teamId = reader.getUint32(3)
# message Resp14014
class Resp14014:
	def __init__(self):
		self.protoid = 14014
		self.status = 0
		self.playerId = 0

	def Marshal(writer):
		writer.setUint32(self.status, 1)
		writer.setUint32(self.playerId, 2)

	def Unmarshal( reader):
		self.status = reader.getUint32(1)
		self.playerId = reader.getUint32(2)
# message Req14015
class Req14015:
	def __init__(self):
		self.protoid = 14015
		self.playerId = 0
		self.teamId = 0
		self.op = 0
		self.name = ""
		self.ann = ""

	def Marshal(writer):
		writer.setUint32(self.playerId, 1)
		writer.setUint32(self.teamId, 2)
		writer.setUint8(self.op, 3)
		writer.setString(self.name, 4)
		writer.setString(self.ann, 5)

	def Unmarshal( reader):
		self.playerId = reader.getUint32(1)
		self.teamId = reader.getUint32(2)
		self.op = reader.getUint8(3)
		self.name = reader.getString(4)
		self.ann = reader.getString(5)
# message Resp14015
class Resp14015:
	def __init__(self):
		self.protoid = 14015
		self.status = 0
		self.playerId = 0

	def Marshal(writer):
		writer.setUint32(self.status, 1)
		writer.setUint32(self.playerId, 2)

	def Unmarshal( reader):
		self.status = reader.getUint32(1)
		self.playerId = reader.getUint32(2)
# message Req14020
class Req14020:
	def __init__(self):
		self.protoid = 14020
		self.playerId = 0
		self.tPlayerId = 0
		self.index = 0
		self.cost = 0

	def Marshal(writer):
		writer.setUint32(self.playerId, 1)
		writer.setUint32(self.tPlayerId, 2)
		writer.setUint32(self.index, 3)
		writer.setUint32(self.cost, 4)

	def Unmarshal( reader):
		self.playerId = reader.getUint32(1)
		self.tPlayerId = reader.getUint32(2)
		self.index = reader.getUint32(3)
		self.cost = reader.getUint32(4)
# message Resp14020
class Resp14020:
	def __init__(self):
		self.protoid = 14020
		self.playerId = 0
		self.tPlayerId = 0
		self.index = 0
		self.cost = 0
		self.status = 0
		self.yuXiang = 0

	def Marshal(writer):
		writer.setUint32(self.playerId, 1)
		writer.setUint32(self.tPlayerId, 2)
		writer.setUint32(self.index, 3)
		writer.setUint32(self.cost, 4)
		writer.setUint32(self.status, 5)
		writer.setUint32(self.yuXiang, 6)

	def Unmarshal( reader):
		self.playerId = reader.getUint32(1)
		self.tPlayerId = reader.getUint32(2)
		self.index = reader.getUint32(3)
		self.cost = reader.getUint32(4)
		self.status = reader.getUint32(5)
		self.yuXiang = reader.getUint32(6)
# message RoseItem
class RoseItem:
	def __init__(self):
		self.protoid = 0
		self.playerId = 0
		self.name = ""
		self.time = 0
		self.count = 0

	def Marshal(writer):
		writer.setUint32(self.playerId, 1)
		writer.setString(self.name, 2)
		writer.setUint32(self.time, 3)
		writer.setUint32(self.count, 4)

	def Unmarshal( reader):
		self.playerId = reader.getUint32(1)
		self.name = reader.getString(2)
		self.time = reader.getUint32(3)
		self.count = reader.getUint32(4)
# message Req14021
class Req14021:
	def __init__(self):
		self.protoid = 14021
		self.playerId = 0
		self.tPlayerId = 0
		self.type = 0

	def Marshal(writer):
		writer.setUint32(self.playerId, 1)
		writer.setUint32(self.tPlayerId, 2)
		writer.setUint8(self.type, 3)

	def Unmarshal( reader):
		self.playerId = reader.getUint32(1)
		self.tPlayerId = reader.getUint32(2)
		self.type = reader.getUint8(3)
# message Resp14021
class Resp14021:
	def __init__(self):
		self.protoid = 14021
		self.playerId = 0
		self.recv = 0
		self.yuXiang = 0
		self.roseItems = []
		self.dangs = []
		self.freeCount = 0
		self.send = 0

	def Marshal(writer):
		writer.setUint32(self.playerId, 1)
		writer.setUint32(self.recv, 2)
		writer.setUint32(self.yuXiang, 3)
		countroseItems = len(self.roseItems)
		writer.setArray(countroseItems, 4)
		for i in range(countroseItems):
			writer.setMessage(0)
			self.roseItems[i].Marshal(writer)
			writer.endSetMessage()
		countdangs = len(self.dangs)
		writer.setArray(countdangs, 5)
		for i in range(countdangs):
			writer.setInt32(self.dangs[i], 0)
		writer.setUint32(self.freeCount, 6)
		writer.setUint32(self.send, 7)

	def Unmarshal( reader):
		self.playerId = reader.getUint32(1)
		self.recv = reader.getUint32(2)
		self.yuXiang = reader.getUint32(3)
		for i in range(reader.getArray(4)):
			msg = RoseItem() 
			reader.getMessage(0)
			msg.Unmarshal(reader)
			reader.endGetMessage()
			self.roseItems.append(msg)
		for i in range(reader.getArray(5)):
			self.dangs.append(reader.getInt32(0))
		self.freeCount = reader.getUint32(6)
		self.send = reader.getUint32(7)
